
from rest_framework import routers
from .views import *
from django.urls import path
urlpatterns=[
    #获取学院列表
    path('colleges',DepartmentView.as_view({'get':'getCollege'})),
    #获取所有的部门类型
    path('department_types',DepartmentTypeView.as_view())
]
router=routers.DefaultRouter(trailing_slash=False)#取消url地址后面的 /
#生成关于 部门的 增删改查 查看单个对象
router.register('departments',DepartmentView,basename='departments')
urlpatterns+=router.urls

